<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::prefix('v1/order')->namespace('API')->group(function () {

  // 微信支付系统回调
  Route::any('order/notifyForWechatPayment', 'OrderController@notifyForWechatPayment');

  // 需要微信登录获取用户身份
  Route::middleware('auth:wechat')->group(function () {

    Route::get('/', 'OrderController@list');
    Route::post('/check', 'OrderController@check');
    Route::post('/commit', 'OrderController@commit');
    // Route::delete('/{goods}', 'OrderController@destroy');
    // Route::delete('/clear', 'OrderController@clear');
  });
});
